﻿using Ewell.Interface.Common.Model.Config;
using Ewell.Interface.Common.Model.GateWay.Dto.Dict;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace Ewell.Interface.Common.Cache
{
    /// <summary>
    /// 接口信息
    /// </summary>
    public class InterfaceCache
    {
        public static ConcurrentDictionary<string, InterfaceInfo> interfaceDict=new ConcurrentDictionary<string, InterfaceInfo>();

        public static InterfaceInfo Get(string key)
        {
            interfaceDict.TryGetValue(key, out InterfaceInfo info);
            return info;
        }

        public static void Add(InterfaceInfo interfaceInfo)
        {
            interfaceDict.TryAdd(interfaceInfo.interfaceId, interfaceInfo);
        }
    }
}
